// import { formatTime } from '@/utils'
import i18n from '@/locales/index'
const { t } = i18n.global

import { formatTime } from '@/utils'

export const columns = [
  {
    key: 'other',
    value: 'other',
    title:'other',
    children:[
      { title: t('deviceManage.waterLineNo'), dataIndex: 'lineNo', key: 'lineNo', align: 'center', width: 120 },
      { title: t('basicData.staff'), dataIndex: 'staffNo', key: 'staffNo', align: 'center', width: 120 },
      { title: '(' +t('basicData.processNo') + ')' + t('basicData.processNames'), dataIndex: 'name1', key: 'name1', align: 'center', width: 120  , sorter: true},
      { title: '(02)开前袋及订标', dataIndex: 'name2', key: 'name2', align: 'center', width: 120  , sorter: true},
      { title: t('common.totals'), dataIndex: 'name3', key: 'name3', align: 'center', width: 120  , sorter: true},
    ]
  }

]

export const columnList = [
  { title: t('report.productDate'), dataIndex: 'processDate', key: 'processDate', align: 'center', width: 120, timeType: 'day',resizable: true,
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD')
    }
  },
  { title: t('deviceManage.waterLine'), dataIndex: 'lineName', key: 'lineName', align: 'center', width: 120 ,resizable: true},
  { title: t('basicData.orderNo'), dataIndex: 'orderNo', key: 'orderNo', align: 'center', width: 120 ,resizable: true},
  { title: t('basicData.styleNo'), dataIndex: 'styleNo', key: 'styleNo', align: 'center', width: 120,resizable: true},
  { title: t('hangManage.poNo'), dataIndex: 'poNo', key: 'poNo', align: 'center', width: 120,resizable: true },
  { title: t('basicData.color'), dataIndex: 'color', key: 'color', align: 'center', width: 120 ,resizable: true},
  { title: t('basicData.size'), dataIndex: 'size', key: 'size', align: 'center', width: 120,resizable: true },
  { title: t('hangManage.stationNo'), dataIndex: 'stationNo', key: 'stationNo', align: 'center', width: 120 ,resizable: true},
  { title: t('basicData.name'), dataIndex: 'staffName', key: 'staffName', align: 'center', width: 120 ,resizable: true},
  { title: t('basicData.processNo'), dataIndex: 'processNo', key: 'processNo', align: 'center', width: 120 ,resizable: true},
  { title: t('basicData.processNames'), dataIndex: 'processName', key: 'processName', align: 'center', width: 120,resizable: true},
  { title: t('other.yield'), dataIndex: 'quantity', key: 'quantity', align: 'center', width: 120 ,resizable: true},
  { title: t('other.yieldRate'), dataIndex: 'achievePercent', key: 'achievePercent', align: 'center', width: 120,resizable: true },
]



